<template>
  <v-md-editor v-model="text" height="600px" @save="handleSave"></v-md-editor>
</template>

<script>
// 文档地址：https://code-farmer-i.github.io/vue-markdown-editor/zh/api.html#props
export default {
  name: "MDEditorComp",
  props: {
    contentMarkDown: {
      type: String,
      default: "",
    },
  },
  data() {
    return {
      text: "",
    };
  },
  created() {
    this.text = this.contentMarkDown;
  },
  methods: {
    handleSave(text, html) {
      console.log("save", text, html);
    },
  },
};
</script>
